#pragma once
#include "Control.h"

class CControlContainer
{
public:
	virtual ~CControlContainer(void) = 0;

	virtual void AddControl(CControl*);
	virtual void RemoveControl(LPCTSTR);
	virtual void RemoveAllControls(void);

protected:
	typedef std::list<std::unique_ptr<CControl>>	_Container;
	_Container										m_vChildCtrls;
	std::map<CString, _Container::iterator>			m_mChildCtrls;
};

class CPanel : virtual public CControl, public CControlContainer
{
public:
	CPanel(LPCTSTR szName, CControl* pParent);
	virtual ~CPanel(void);

protected:
	virtual CAppearance* _CreateAppearance(const Jin::CProperties&);
	virtual void _UpdateLayout(void);
	virtual void _PaintClientArea(const Rect&);
	
};


